﻿using DevExpress.XtraCharts;
using DevExpress.XtraEditors;
using DXApplicationTangche.UC.金蝶;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace DXApplicationTangche.UC.抖音出入库.抖音UC
{
    public partial class XtraUserControl抖音款式销量图表 : DevExpress.XtraEditors.XtraUserControl
    {
        private List<DouyinSaleDTO> douyinSaleDTOs销量 = new List<DouyinSaleDTO>();
        private List<DouyinSaleDTO> douyinSaleDTOs面料 = new List<DouyinSaleDTO>();
        public XtraUserControl抖音款式销量图表()
        {
            InitializeComponent();
            this.douyinSaleDTOs销量.Add(new DouyinSaleDTO("2021-10", 100));
            this.douyinSaleDTOs销量.Add(new DouyinSaleDTO("2021-11", 90));
            this.douyinSaleDTOs销量.Add(new DouyinSaleDTO("2021-12", 110));
            //this.douyinSaleDTOs面料.Add(new DouyinSaleDTO("20F110", 50));
            //this.douyinSaleDTOs面料.Add(new DouyinSaleDTO("19FJ21", 60));
            //this.douyinSaleDTOs面料.Add(new DouyinSaleDTO("21F58", 70));

            //DevExpress.XtraCharts.Series series = new DevExpress.XtraCharts.Series("款式销量", ViewType.Bar);
            //DevExpress.XtraCharts.Series series2 = new DevExpress.XtraCharts.Series("面料库存", ViewType.Bar);
            //DevExpress.XtraCharts.Series series = new DevExpress.XtraCharts.Series("款式销量", ViewType.Line);
            DevExpress.XtraCharts.Series series = new DevExpress.XtraCharts.Series("21F110-3", ViewType.Line);

            chartControl1.Series.Add(series);
            foreach (DouyinSaleDTO douyinSaleDTO in this.douyinSaleDTOs销量)
            {
                series.Points.AddPoint(douyinSaleDTO.styleNameCn, douyinSaleDTO.saleCount);
            }

            //chartControl1.Series.Add(series2);
            //foreach (DouyinSaleDTO douyinSaleDTO in this.douyinSaleDTOs面料)
            //{
            //    series2.Points.AddPoint(douyinSaleDTO.styleNameCn, douyinSaleDTO.saleCount);
            //}
        }
    }
}
